//
// Created on 2025/11/17.
// Author 秦光磊.

#ifndef MYAPPLICATION_PLUGIN_MANAGER_H
#define MYAPPLICATION_PLUGIN_MANAGER_H
#include "render/plugin_render.h"
#include <cstdint>
#include "napi/native_api.h"
#include <unordered_map>
namespace MyApp {
class PluginManager {
public:
    ~PluginManager();
    static PluginRender *GetPluginRender(int64_t &id);
    static napi_value ChangeColor(napi_env env, napi_callback_info info);
    static napi_value DrawPattern(napi_env env, napi_callback_info info);
    static napi_value SetSurfaceId(napi_env env, napi_callback_info info);
    static napi_value ChangeSurface(napi_env env, napi_callback_info info);
    static napi_value DestroySurface(napi_env env, napi_callback_info info);
    static napi_value GetXComponentStatus(napi_env env, napi_callback_info info);

public:
    static std::unordered_map<int64_t, PluginRender *> pluginRenderMap_;
    static std::unordered_map<int64_t, OHNativeWindow *> windowMap_;
};
} // namespace MyApp
#endif // MYAPPLICATION_PLUGIN_MANAGER_H
